﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using StoragePeriod.Model.RawDict;
using System.Data;

namespace StoragePeriod.IDAL.RawDict
{
    /// <summary>
    /// 原料操作
    /// </summary>
    public interface I_RawMaterial
    {
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        bool Exists(int id);
        
        /// <summary>
        /// 增加一条数据
        /// </summary>
        void Add(E_RawMaterial model);
        
        /// <summary>
        /// 更新一条数据
        /// </summary>
        bool Update(E_RawMaterial model);
       
        /// <summary>
        /// 删除一条数据
        /// </summary>
        bool Delete(int id);
       
        /// <summary>
        /// 删除一条数据
        /// </summary>
        bool DeleteList(string idlist);
        
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        E_RawMaterial GetModel(int id);

        /// <summary>
        /// 根据查询条件获取原料数据列表
        /// </summary>
        /// <param name="eRawMaterial">查询条件</param>
        /// <returns>返回符合要求的原料数据列表</returns>
        List<E_RawMaterial> GetRawListByWhere(E_RawMaterial eRawMaterial);

        /// <summary>
        /// 获得数据列表
        /// </summary>
        DataSet GetList(string strWhere);
    }
}
